/**
 * @file wa_disp_drv.h
 * 
 */

#ifndef _WA_DISP_DRV_H
#define _WA_DISP_DRV_H

#ifdef __cplusplus
extern "C" {
#endif


/*********************
 *      INCLUDES
 *********************/

#include "wa_conf.h"
#include <string.h>
#include <stddef.h>
#include <stdbool.h>
#include <stdint.h>
#include "wa_misc.h"
 
/*********************
 *      DEFINES
 *********************/
 

/**********************
 *      TYPEDEFS
 **********************/

typedef struct _disp_drv
{
	void (*disp_setpixel)(int32_t x, int32_t y, wa_gui_color color);
	wa_gui_color (*disp_getpixel)(int32_t x, int32_t y);
	void (*disp_fill)(int32_t x, int32_t y, int32_t width, int32_t height, wa_gui_color color);
	void (*disp_clear)(void);
	void (*disp_update)(int32_t x, int32_t y, int32_t width, int32_t height);
} wa_disp_drv;
/**********************
 * GLOBAL PROTOTYPES
 **********************/

wa_result wa_disp_drv_init(void);
void wa_disp_drv_set_setpixel(void (*disp_setpixel)(int32_t, int32_t, wa_gui_color));
void wa_disp_drv_set_getpixel(wa_gui_color(*disp_getpixel)(int32_t, int32_t));
void wa_disp_drv_set_fill(void (*disp_fill)(int32_t,int32_t,int32_t,int32_t,wa_gui_color));
void wa_disp_drv_set_clear(void (*disp_clear)(void));
void wa_disp_drv_set_update(void (*disp_update)(int32_t, int32_t, int32_t, int32_t));
void wa_disp_drv_setpixel(int32_t x, int32_t y, wa_gui_color color);
wa_gui_color wa_disp_drv_getpixel(int32_t x, int32_t y);
void wa_disp_drv_fill(int32_t x, int32_t y, int32_t width, int32_t height, wa_gui_color color);
void wa_disp_drv_clear(void);
void wa_disp_drv_update(int32_t x, int32_t y, int32_t width, int32_t height);
/**********************
 *      MACROS
 **********************/

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif

